JBoss Community Archive (Read Only)

SwitchYard 0.8

Getting Started

First Steps with SwitchYard

The sole objective of this guide is to help new users get up and running with SwitchYard as quickly as possible.  The manner in which we will achieve this objective is ruthless efficiency.  If you have questions that begin with "why" or "how", check out the other docs in the set.  If you have no time for any of that nonsense, then read on.

Prerequisites

If you want to get down with SwitchYard, you'll need some Maven and Java to get the job done.

  • Java 6 or Java 7

  • Maven 3

Install SwitchYard

Go to the SwitchYard Downloads page and download "switchyard-as7-[version].zip" under Current Release.  Once downloaded, extract the zip to a location of your choice (/tmp recommended for those that fear commitment), e.g.

cd /tmp
unzip switchyard-as7-0.8.0.Final.zip

Start the Server

In the bin/ directory of your distribution, you'll find a script called standalone.sh (*nix) and another called standalone.bat (Windows).  Execute the appropriate script for your platform.

cd switchyard-as7-0.8
bin/standalone.sh

The server will start in anywhere from 1 - 3 seconds depending on the age and price of your computing device.   You know SwitchYard is ready to rock once you see this:

19:23:24,575 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 1176ms - Started 161 of 237 services (74 services are passive or on-demand)

Deploy an Application

There are many applications to chose from in the quickstarts/ directory of your distribution.  A nice one to start with is the remote-invoker application.  There are a number of ways to deploy an application to the SwitchYard runtime, but we'll go with Maven as it's righteous.  You will need a separate terminal or command window from the one where you started the server.

cd quickstarts/remote-invoker
mvn package
mvn jboss-as:deploy

You will see output similar to the following after a successful deployment.

[INFO] --- jboss-as-maven-plugin:7.1.1.Final:deploy (default-cli) @ switchyard-quickstart-remote-invoker ---
Mar 25, 2013 7:32:35 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Mar 25, 2013 7:32:35 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Mar 25, 2013 7:32:35 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
[INFO] --------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------

Invoke the Application

You can send a message to the deployed remote-invoker application using Maven as well.

mvn exec:java

After running the command, you'll see this in the command output:

==================================
Was the offer accepted? true
==================================

You will see some output in the server console as well:

19:41:08,114 INFO [stdout] (http--127.0.0.1-8080-1) Approving credit for John Smith

Success

If you've made it this far, you're OK in my book.  Each quickstart has a Readme.md file which provides step-by-step instructions for deploying and testing.  Give some of the other apps a try and see what this crazy project can do.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 09:49:31 UTC, last content change 2013-03-26 00:00:27 UTC.